package com.example.link1;

import com.example.link1.R;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.support.v4.app.NavUtils;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        WebView web = (WebView) findViewById(R.id.webView1);
        
        String html = "<html>" +
        					"<head>"+
        						"<script type=\"text/javascript\">" +
	        						"unction runProgram()"+
	        						"{" +
	        	//					"var shell = new ActiveXObject(\"WScript.Shell\");"+                 
	        		//				"var appWinMerge = \"\";"+
	        							"alert('abc');"+
	        						"}"+
        						"</script>"+
    						"</head>"+
    						"<body>" + 
									"<a href='test://cannc-ga'>go to app link2 </a>" +     				
									"<p>If you set the target attribute to \"_blank\", the link will open in a new browser window/tab.</p>" +
									"<a href=\"javascript:runProgram()\">scheme</a>" +
							"</body>" +
						"</html>";
        web.loadData(html, "text/html", "utf-8");

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    
}
